public class Test01 {
    public static void main(String[] args) {
//        str(1000000);
        System.out.println("========================");
        strbuilder(1000000);
    }
    //使用String拼接字符串
    public static void str(int n){
        String s="";
        for (int i = 0; i <n; i++) {
            s+="abc";
        }
        System.out.println(s);
    }
    public static void strbuilder(int n){
//        String s="";
        StringBuilder sb=new StringBuilder();
        for (int i = 0; i <n ; i++) {
            sb.append("abc");
        }
        System.out.println(sb);
    }
}
